export PATH=$PATH:/usr/bin
CC=g++
LD=ld

TESTCODE_DIR += $(PWD)/
print-%s:;@echo $(TESTCODE_DIR)

# .h files
C_INCLUDES += -I $(TESTCODE_DIR)

# compile files
NEED_COMPILE_SRC = $(PWD)/*.cpp     #或者 $(wildcard $(PWD)/*.cpp)

# cflags
CFLAGS = -pie -DSELF -Wall

#ifeq "$(TARGET)" "MY"
#else
#endif

# target
TARGET = $(PWD)/out

#libs
LIBS += -ldl -lrt -std=c++11

# if no .o file###############################
all:	
	$(CC) -g -o $(TARGET) $(C_INCLUDES) $(NEED_COMPILE_SRC) $(CFLAGS) $(LIBS)


